﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;

namespace GUI
{
    public partial class Form_Menu : Form
    {
        public Form_Menu()
        {
            InitializeComponent();
        }

        private void navB_Nhaphang_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_NhapHang frm = new Form_NhapHang();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_DatHang_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_TaoDonDatHang frm = new Form_TaoDonDatHang();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_DHStockist_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_BanHang_TV frm = new Form_BanHang_TV();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_BienNhanKH_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_BanHang_KTV frm = new Form_BanHang_KTV();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_TKBH_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_ThongKeBanHang frm = new Form_ThongKeBanHang();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_DiemHangThang_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_ThongKeBaoDiemHangThang frm = new Form_ThongKeBaoDiemHangThang();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_DiemTV_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_BaoDiemThanhVien frm = new Form_BaoDiemThanhVien();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_TKDH_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_ThongKeDonDatHang frm = new Form_ThongKeDonDatHang();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_TCTV_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            //Form_TraCuuThanhVien frm = new Form_TraCuuThanhVien();
            Form_BaoDiemThanhVien frm = new Form_BaoDiemThanhVien();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_CapNhatTV_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_CapNhatThanhVien frm = new Form_CapNhatThanhVien();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_CapNhatSP_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_CapNhatSanPham frm = new Form_CapNhatSanPham();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_CapNhatLoaiSP_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_CapNhatLoaiSanPham frm = new Form_CapNhatLoaiSanPham();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_CapNhatNV_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_CapNhatNhanVien frm = new Form_CapNhatNhanVien();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_CapNhatTS_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_CapNhatThamSo frm = new Form_CapNhatThamSo();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_CauHinhTB_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_CauHinhThietBi frm = new Form_CauHinhThietBi();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_CauHinhPM_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_CauHinhPhanMem frm = new Form_CauHinhPhanMem();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_TKNB_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_ThongKeNguoiBan frm = new Form_ThongKeNguoiBan();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_SaoLuu_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            panel_content.Controls.Clear();
            BackupRestoBUS _BUS = new BackupRestoBUS();
            try
            {
                _BUS.Backup();
                MessageBox.Show("Sao Lưu Thành Công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void navBarItem18_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            panel_content.Controls.Clear();
            BackupRestoBUS _BUS = new BackupRestoBUS();
            try
            {
                _BUS.Resto();
                MessageBox.Show("Phục hồi Thành Công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void navBarItem_HuongDan_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_HuongDan frm = new Form_HuongDan();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_PhienBan_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_PhienBan frm = new Form_PhienBan();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

        private void navBarItem_LienHe_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Form_LienHe frm = new Form_LienHe();
            frm.Dock = DockStyle.Fill;
            panel_content.Controls.Clear();
            panel_content.Controls.Add(frm);
        }

      
    }
}
